<template>
    <div class="right vipLevel">
		<div class="level_tit tit clearfix">
			<span class="pull-left">会员等级</span>
			<router-link to="/addLevel" style="color:#fff;"><button class="btn btn-primary btn-sm pull-right add">+添加会员等级</button></router-link>
		</div>
		<table class="table table-striped" id="level">
			<thead>
				<th>会员类型</th>
				<th>等级图标</th>
				<th>等级名称</th>
				<th>等级折扣</th>
				<th>操作</th>
			</thead>
			<tbody>
				<tr v-for="obj in user">
					<td>
						<span v-if="!obj.type">普通用户组</span>
						<span v-if="obj.type">特殊用户组</span>
					</td>
					<td><img :src="obj.file" style="width:20px;height:auto;" alt=""></td>
					<td>{{obj.name}}</td>
					<td>{{obj.discount}}</td>
					<td>{{obj.discount}}</td>
				</tr>
			</tbody>
		</table>
	</div>
</template>
<script>
    import getStorage from "../js/getStorage"
    export default {
        data(){
            return{
                user:[{
					type:false,
					file:require("../images/normal.png"),
					name:"普通会员",
					discount:"88%"	
				},
				{
					type:true,
					file:require("../images/vip.png"),
					name:"商户会员",
					discount:"85%"	
				},...getStorage("vip")]
            }
        }
    }
</script>
<style scoped lang="css">
	.level_tit{
		background:url("../images/vip_list_03.jpg") 5px 25px no-repeat;
	}
</style>